import request from '@/utils/request'

export function storages(data) {
  return request({
    url: 'admin/cmd/v1/storage',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: 'admin/cmd/v1/storage',
    method: 'delete',
    data
  })
}

export function listPath(relId) {
  return request({
    url: 'admin/cmd/v1/storage/listPath/' + relId,
    method: 'get'
  })
}

export function upload(data) {
  return request({
    url: 'admin/cmd/v1/storage/upload',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
